package com.ce.nw.common.model;

import org.hibernate.annotations.GenericGenerator;
import org.hibernate.validator.constraints.Length;

import javax.persistence.*;
import java.io.Serializable;

/**
 * Created by ccxxu on 2019-07-31.
 */
@Entity
@Table(name = "RBAC_GROUP_ROLE")
public class RbacGroupRole implements Serializable {

    /**
     * id       db_column: ID
     */
    @Length(max=32)
    private String id;

    /**
     * roleId       db_column: ROLE_ID
     */
    @Length(max=32)
    private String roleId;

    /**
     * groupId       db_column: GROUP_ID
     */
    @Length(max=32)
    private String groupId;

    public RbacGroupRole(){
    }

    public RbacGroupRole(String id){
        this.id = id;
    }

    public void setId(String value) {
        this.id = value;
    }

    @Id
    @GeneratedValue(generator="uuid")
    @GenericGenerator(name="uuid",strategy="uuid.hex")
    @Column(length=32)
    public String getId() {
        return this.id;
    }

    @Column(name = "ROLE_ID", unique = false, nullable = true, insertable = true, updatable = true, length = 32)
    public String getRoleId() {
        return this.roleId;
    }

    public void setRoleId(String value) {
        this.roleId = value;
    }

    @Column(name = "GROUP_ID", unique = false, nullable = true, insertable = true, updatable = true, length = 32)
    public String getGroupId() {
        return this.groupId;
    }

    public void setGroupId(String value) {
        this.groupId = value;
    }

}
